<v-contextmenu ref="contextmenu" v-if="publicTree.newChildren&&publicTree.newChildren.length>0">
  <template v-if="publicTree.selectKey!==null&&publicTree.newChildren[publicTree.selectKey]">
    <template v-if="publicTree.newChildren[publicTree.selectKey].inc_type!=='dir'&&publicTree.newChildren[publicTree.selectKey].inc_type!=='cad'&&publicTree.newChildren[publicTree.selectKey].inc_type!=='cadDir'">
      <template v-if="publicTree.newChildren[publicTree.selectKey].promise.is_read==1">
        <v-contextmenu-item
        @click="$emit('view',publicTree.newChildren[publicTree.selectKey])">查看
      </v-contextmenu-item>
      <v-contextmenu-item
      @click="$emit('download',publicTree.newChildren[publicTree.selectKey])">下载
    </v-contextmenu-item>
    <v-contextmenu-item
    @click="$emit('copy',publicTree.newChildren[publicTree.selectKey])">复制
  </v-contextmenu-item>
  <v-contextmenu-item
  @click="$emit('shouchang',publicTree.newChildren[publicTree.selectKey])">收藏
</v-contextmenu-item>
<v-contextmenu-item
                  @click="$emit('history',publicTree.newChildren[publicTree.selectKey])">历史版本
    </v-contextmenu-item>
</template>
<v-contextmenu-item
    v-if="publicTree.newChildren[publicTree.selectKey].promise.is_share==1"
                @click="$emit('share',publicTree.newChildren[publicTree.selectKey])">分享
    </v-contextmenu-item>
<template v-if="publicTree.newChildren[publicTree.selectKey].promise.is_write==1">
  <v-contextmenu-item
  @click="$emit('delete',publicTree.newChildren[publicTree.selectKey])">删除
</v-contextmenu-item>
<v-contextmenu-item
                  @click="$emit('cute',publicTree.newChildren[publicTree.selectKey])">剪切
    </v-contextmenu-item>
</template>
</template>
<template v-else>
  <template
      v-if="publicTree.selectKey!==null&&publicTree.newChildren[publicTree.selectKey]&&publicTree.newChildren[publicTree.selectKey].inc_type=='dir'">
    <template   v-if="publicTree.newChildren[publicTree.selectKey].promise.is_write==1">
      <v-contextmenu-item @click="$emit('upload',publicTree.newChildren[publicTree.selectKey])">上传文件
    </v-contextmenu-item>
    <v-contextmenu-item @click="$emit('paste',publicTree.newChildren[publicTree.selectKey])">粘贴
  </v-contextmenu-item>
</template>
<template v-else>
  <v-contextmenu-item  ><span  style="color: #dddddd;display: inline-block;width: 100%;cursor: not-allowed">上传文件</span>
  </v-contextmenu-item>
  <v-contextmenu-item  ><span style="color: #dddddd;display: inline-block;width: 100%;cursor: not-allowed">粘贴</span>
  </v-contextmenu-item>
</template>
</template>
<template v-if="publicTree.newChildren[publicTree.selectKey].inc_type=='cadDir'">
  <v-contextmenu-item v-if=" publicTree.newChildren[publicTree.selectKey].promise.is_write==1"
  @click="$emit('addCad',publicTree.newChildren[publicTree.selectKey])">添加图纸号
</v-contextmenu-item>
<v-contextmenu-item v-else><span
    style="color: #dddddd;display: inline-block;width: 100%;cursor: not-allowed">添加图纸号</span>
</v-contextmenu-item>
</template>
<template v-if="publicTree.newChildren[publicTree.selectKey].inc_type=='cad'">
  <v-contextmenu-item v-if=" publicTree.newChildren[publicTree.selectKey].promise.is_write==1"
  @click="$emit('editCad',publicTree.newChildren[publicTree.selectKey])">编辑图纸号
</v-contextmenu-item>
<v-contextmenu-item v-else><span
    style="color: #dddddd;display: inline-block;width: 100%;cursor: not-allowed">编辑图纸号</span>
</v-contextmenu-item>
<v-contextmenu-item v-if=" publicTree.newChildren[publicTree.selectKey].promise.is_write==1"
                                  @click="$emit('delCad',publicTree.newChildren[publicTree.selectKey])">删除图纸号
    </v-contextmenu-item>
<v-contextmenu-item v-else><span
    style="color: #dddddd;display: inline-block;width: 100%;cursor: not-allowed">删除图纸号</span>
</v-contextmenu-item>
</template>
</template>
</template>
</v-contextmenu>
